package o;

import java.io.File;
import java.util.Map;
import o.dbo.b;

public class dbt implements dmi {
    private boolean ˊ;
    private e ˋ;
    private Map<String, File> ˎ;
    private dbw ˏ;
    private dbq ॱ;
    private long ॱॱ = System.currentTimeMillis();

    public interface e {
        void ˋ(float f);

        void ˋ(boolean z);

        void ॱ();
    }

    public dbt(Map<String, File> map, dbw o_dbw, e eVar) {
        this.ˎ = map;
        this.ˏ = o_dbw;
        this.ˋ = eVar;
    }

    public void ˎ() {
        dbk.ˏ.ˎ("FileUploadTask", "cancel");
        if (!this.ˊ && this.ॱ != null) {
            this.ॱ.ˏ();
            this.ˊ = true;
            dmq.ॱ.ˊ(new dmi(this) {
                final /* synthetic */ dbt ˊ;

                {
                    this.ˊ = r1;
                }

                public void run() {
                    this.ˊ.ˋ.ॱ();
                }
            });
        }
    }

    public void run() {
        for (File file : this.ˎ.values()) {
            if (file.exists()) {
                if (!file.canRead()) {
                }
            }
            dbk.ˏ.ˏ("FileUploadTask", "upload file not exist" + file);
            dmq.ॱ.ˊ(new dmi(this) {
                final /* synthetic */ dbt ˏ;

                {
                    this.ˏ = r1;
                }

                public void run() {
                    this.ˏ.ˋ.ˋ(false);
                }
            });
            return;
        }
        this.ॱ = new dbq();
        final boolean ॱ = this.ॱ.ॱ(this.ˎ, this.ˏ, new b(this) {
            final /* synthetic */ dbt ˊ;

            {
                this.ˊ = r1;
            }

            public void ˏ(long j, long j2) {
                long currentTimeMillis = System.currentTimeMillis();
                if (j >= j2 || currentTimeMillis - this.ˊ.ॱॱ >= 100) {
                    this.ˊ.ॱॱ = currentTimeMillis;
                    final long j3 = j;
                    final long j4 = j2;
                    dmq.ॱ.ˊ(new dmi(this) {
                        final /* synthetic */ AnonymousClass5 ॱ;

                        public void run() {
                            this.ॱ.ˊ.ˋ.ˋ(((float) j3) / ((float) j4));
                        }
                    });
                }
            }
        });
        if (!this.ˊ) {
            dmq.ॱ.ˊ(new dmi(this) {
                final /* synthetic */ dbt ˎ;

                public void run() {
                    this.ˎ.ˋ.ˋ(ॱ);
                }
            });
        }
    }
}
